package com.hy.controller;

import com.hy.pojo.City;
import com.hy.service.CityService;
import com.hy.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("city")
public class CityController {
    @Autowired
    CityService cityService;

    @RequestMapping("findCity")
    public Result findCity(Integer provinceId){
        List<City> list = cityService.findCity( provinceId);
        return Result.success("查询成功", list);
    }
}
